home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 May: Tool Chest / Developer CD Series Tool Chest (Apple Computer)(May 1999).iso / Tool Chest / Devices / NuBus⁄Slot Manager / Declaration ROMs / Ex Apple Video ROM / Ex Apple EtherNet ROM / Ex Apple EtherROM.a < prev    next >
Encoding:
Text File  |  1992-08-14  |  7.8 KB  |  190 lines  |  [TEXT/MPS ]

  1.  
  2.  
  3. **********************************************************************
  4. **********************************************************************
  5. *
  6. *    File           : EtherROM.a
  7. *    Author         : GN, Oct 26, 1986.
  8. *    Description    : This file contains the data structure definition 
  9. *                    for the EtherNet card.
  10. *    Mod History : MacDTS 3/29/89 - upgraded for MPW 3.0 (see below).
  11. *                         4/12/89 - added notes to developers, fixed 
  12. *                                   comments in general
  13. *
  14. *    NOTES:     Some equates in MPW's ROMEqu file have changed.  The ones
  15. *            that affect this file are the sResource id values, which
  16. *            have had the annoying underscore characters removed.  In
  17. *            other words:
  18. *            
  19. *             sRsrc_Type becomes sRsrcType   in the 3.0 version of ROMEqu.a
  20. *             sRsrc_Name becomes sRsrcName   in the 3.0 version of ROMEqu.a
  21. *             Rev1       becomes romRevision in the 3.0 version of ROMEqu.a
  22. *
  23. *            The VALUES stay the same, that is:
  24. *
  25. *            sRsrcType        EQU         1            ;Type of sResource
  26. *            sRsrcName        EQU         2            ;Name of sResource
  27. *            romRevision     EQU         1            ;First ROM revision.
  28. *
  29. *            I've changed the equates so that this file builds under 3.0
  30. *            I also fixed the include file list to reflect 3.0 names.
  31. *
  32. *            IMPORTANT NOTE:  THE APPLE IMPLEMENTATION OF THIS ROM HAS
  33. *            A TEST SRESOURCE (SRESOURCE DIR ID 129), WHICH IS AN HISTORICAL,
  34. *            SPECIAL-PURPOSE, SPECIAL-FORMAT SRESOURCE, THAT IS ONLY USED BY
  35. *            APPLE FOR INTERNAL TESTING PURPOSES.  IT HAS BEEN REMOVED IN
  36. *            THIS EXAMPLE, SINCE YOU DON'T NEED IT AT ALL!!!  ALL THAT IS
  37. *            REQUIRED IS THE BOARD SRESOURCE (LABELED _sRsrc_Board), AND
  38. *            THE FUNCTIONAL SRESOURCE (LABELED _sRsrc_Ethernet)
  39. *
  40. *            I've made a MacDraw II document showing the exploded Config
  41. *            ROM (including the test sResource in case someone wants to 
  42. *            look at the ROM.  You'll find it on the disk or up on 
  43. *            AppleLink...
  44. *
  45. *MB (MacDTS)
  46. **********************************************************************
  47. **********************************************************************
  48.  
  49. ;Include files
  50.                 PRINT    OFF
  51.                 INCLUDE    'SysErr.a'                        ;Macintosh System equates
  52.                 INCLUDE    'SysEqu.a'                        ;Macintosh System equates
  53.                 INCLUDE    'ROMEqu.a'                        ;Declaration ROM equates
  54.                 INCLUDE    'SlotEqu.a'                        ;Slot Manager equates and macros
  55.                 INCLUDE    'TimeEqu.a'                        ;Macintosh traps
  56.                 INCLUDE    'Traps.a'                        ;Macintosh traps
  57.                 INCLUDE    'DepEtherEqu.a'                    ;dependent EtherNet equates
  58.  
  59.                 PRINT    ON
  60.  
  61.  
  62. VideoDeclROM    MAIN
  63.                 STRING     C
  64.  
  65.             
  66. ;-----------  sResource Directory    ;<Id OF>
  67. sRsrc_Board        EQU        1            ;Board sResource {May be any number in [0..127]}
  68. sRsrc_Ether        EQU        128            ;EtherNet sResource {May be any number in [128..254]}
  69.  
  70. ;-----------  sResource Directory    ;<Id OF>
  71. EtherAddr        EQU        128            ;EtherNet Address
  72.  
  73.             
  74.                 EJECT
  75. ;*************************************************************
  76. ;Data Structure
  77. ;*************************************************************
  78.  
  79.                                                             ;DEVELOPER: CHANGE THIS TO YOUR ETHERNET ADDR
  80. _EtherAddr        DC.L    $02608c00                            ;This is out of the CRC check range.
  81.                 DC.L    $00010000                            ;This is out of the CRC check range.
  82.  
  83.  
  84. ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  85. ;            Directory
  86. ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  87. ;                                <ID>    <OFFSET/DATA>            <ID>                <OFFSET/DATA>
  88. _sRsrcDir        OSLstEntry    sRsrc_Board,_sRsrc_Board        ;<sRsrc_Board>  <Board sRsrc List offset>
  89.                 OSLstEntry    sRsrc_Ether,_sRsrc_Ethernet        ;<sRsrc_Ether>     <Ethernet sRsrc List offset>
  90.                 DatLstEntry    EndOfList,0                        ;<EndOfList>    <0>
  91.  
  92.  
  93.  
  94. ;=============================================================
  95. ;            sRsrc_Board List
  96. ;=============================================================
  97. ;                                <ID>    <OFFSET/DATA>            <ID>                <OFFSET/DATA>
  98. _sRsrc_Board    OSLstEntry    sRsrcType,_BoardType            ;<sRsrc_Type>  <Board Type offset>
  99.                 OSLstEntry    sRsrcName,_BoardName            ;<sRsrc_Name>  <Name of Board offset>
  100.                 DatLstEntry    BoardId,EtherBoardId            ;<BoardId>     <EtherBoardId>
  101.                 OSLstEntry    VendorInfo,_VendorInfo            ;<VendorInfo>  <_VendorInfo record offset>
  102.                 DatLstEntry    EndOfList,0                        ;<EndOfList>    <0>
  103.  
  104.                                                             ;sRsrc_Type always same for board sResource - functional
  105.                                                             ;sRsrc_Type varies by board function and is assigned by
  106.                                                             ;MacDTS
  107. _BoardType        DC.W    CatBoard                            ;Category = $0001 for board sResource ALWAYS
  108.                 DC.W    TypBoard                            ;Type = $0000 for board sResource ALWAYS
  109.                 DC.L    0                                    ;DrvrSW and DrvrHW = $0000 for bd sResource ALWAYS
  110. _BoardName        DC.L    'EtherNet card'                        ;DEVELOPER: CHANGE THIS: to the name of your board                    
  111.                                                             ;(by convention: should be board's official product name)
  112.  
  113.  
  114. ;-------------------------------------------------------------
  115. ;            Vendor Info record (vendor/Developer specific, Apple doesn't assign)
  116. ;-------------------------------------------------------------
  117. _VendorInfo        OSLstEntry    VendorId,_VendorId                ;<VendorId>  <VendorId offset>
  118.                 OSLstEntry    RevLevel,_RevLevel                ;<RevLevel>  <RevLevel offset>
  119.                 OSLstEntry    PartNum,_PartNum                ;<PartNum>   <PartNum offset>
  120.                 DatLstEntry    EndOfList,0                        ;<EndOfList>  <0>
  121.                                                             ;DEVELOPER: CHANGE THESE TO WHATEVER YOU WANT
  122. _VendorId        DC.L    'Apple Computer/3 Comm'                ;Vendor Id (vendor assigns. Can be anything; usually Co. name)
  123. _RevLevel        DC.L    'B 5.0'                                ;Revision Level (vendor assigns)
  124. _PartNum        DC.L    'Et-1234'                            ;Part Number (vendor assigns)
  125.  
  126.  
  127.     
  128.     
  129.                 EJECT
  130. ;=============================================================
  131. ;            sRsrc_Ethernet
  132. ;=============================================================
  133.                 STRING        AsIs
  134. ;                                <ID>    <OFFSET/DATA>            <ID>                <OFFSET/DATA>
  135. _sRsrc_Ethernet    OSLstEntry    sRsrcType,_EtherType            ;<sRsrc_Type>    <Offset to Ethernet Type>
  136.                 OSLstEntry    sRsrcName,_EtherName            ;<sRsrc_Name>    <Offset to Name of Ethernet sRsrc>
  137.  
  138. ;Parameters
  139.                 OSLstEntry    MinorBaseOS,_MinorBase            ;<MinorBaseOS> <offset>    {sInteger_32}
  140.                 
  141.                 DC.W        (EtherAddr<<8)+$FF                ;<EtherAddr>    <offset>
  142.                 DC.W        -*+2
  143.  
  144.                 DatLstEntry    EndOfList,0                        ;<EndOfList>   <0>
  145.  
  146.  
  147.                 STRING        C                                ;DEVELOPER: CHANGE THIS TO WHAT DTS ASSIGNS YOU
  148. _EtherType        DC.W    CatNetwork                            ; category = network
  149.                 DC.W    TypEtherNet                            ; type = ethernet
  150.                 DC.W    0                                    ; drvrSW = don't care
  151.                 DC.W    DrHw3Com                            ; drvrHW = 3Com (varies by developer)
  152. _EtherName        DC.L    'Network_Ethernet_Apple_3Com'        ;DEVELOPER: CHANGE THIS
  153.                                                             ;By convention, this is the sRsrc_Type with the prefixes stripped off,
  154.                                                             ;and separated by underscores.  In this example, the sRsrc_Type is:
  155.                                                             ;CatNetwork,TypEtherNet,DrvrSWApple,DrvrHW3Com.  
  156.                                                             ;However, there is a minor problem.  In this example, a DC.W 0
  157.                                                             ;was used instead of DC.W DrvrSWApple, so actually DrvrSWApple = $0000 is
  158.                                                             ;assumed. The string could have been used, but in there is a potential
  159.                                                             ;conflict, since, in ROMEqu.a, DrSwApple = $0001 is defined (for the
  160.                                                             ;video function sRsrc_Type: CatDisplay, TypVideo, DrSwApple, DrHwxxx)
  161.                                                             ;
  162.                                                             ;But, anyway, assuming the sRsrc_Type was really defined here as
  163.                                                             ;CatNetwork,TypEtherNet,DrvrSWApple,DrvrHW3Com, the name becomes
  164.                                                             ;Network_Ethernet_Apple_3Com (Cat, Type, DrvrSW, and DrvrSW prefixes stripped
  165.                                                             ;and separated by underscores
  166.                                                             ;
  167. _MinorBase        DC.L    $D0000                                ;EtherNet RAM base.
  168.  
  169.  
  170. ;                ORG        ROMSize-fhBlock.fhBlockSize            ;don't use
  171.                 ORG        ROMSize-FHeaderRec.fhBlockSize        ;fhBlock changed to FHeaderRec in mpw 3.0
  172. ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  173. ;            Format/Header Block
  174. ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  175.                 DC.L    (_sRsrcDir-*)**$00FFFFFF            ;Offset to sResource directory
  176.                 DC.L    ROMSize-8                            ;Length of declaration data
  177.                 DC.L    0                                    ;CRC {Patched by crcPatch}
  178.                 DC.B    romRevision                            ;Revision level
  179.                 DC.B    AppleFormat                            ;Format
  180.                 DC.L    TestPattern                            ;Test pattern
  181.                 DC.B    0                                    ;Reserved byte
  182.                 DC.B    $A5                                    ;ByteLanes: 1010 0101
  183.  
  184.  
  185.                 ENDP
  186.  
  187.             
  188.                 END
  189.  
  190.